package com.example.grpc.consume.config;

import com.example.grpc.consume.interceptor.LogGrpcInterceptor;
import io.grpc.ClientInterceptor;
import net.devh.boot.grpc.client.interceptor.GrpcGlobalClientInterceptor;
import org.springframework.context.annotation.Configuration;

/**
 * @author liyuncong
 * @version 1.0
 * @file GlobalInterceptorConfiguration
 * @brief GlobalInterceptorConfiguration
 * @details GlobalInterceptorConfiguration
 * @date 2022-11-09
 *
 * Edit History
 * ----------------------------------------------------------------------------
 * DATE                        NAME               DESCRIPTION
 * 2022-11-09                  liyuncong          Created
 */
@Configuration
public class GlobalInterceptorConfiguration {

    @GrpcGlobalClientInterceptor
    ClientInterceptor logInterceptor() {
        return new LogGrpcInterceptor();
    }
}
